home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
libs
/
unixlib.lha
/
unix
/
src
/
read.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-01-04
|
305b
|
17 lines
#include "amiga.h"
#include "files.h"
#include <fcntl.h>
int __read(int fd, void *buffer, unsigned int length)
{
struct fileinfo *fi;
__chkabort();
if (fi = _find_fd(fd)) {
if (fi->flags & FI_READ)
return fi->read(fi->userinfo, buffer, length);
errno = EACCES;
}
return -1;
}